package com.xszx.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;

import com.xszx.bean.EmpInfo;
import com.xszx.bean.Insurance;
import com.xszx.bean.Memo;
import com.xszx.bean.Position;
import com.xszx.bean.TalentBank;
import com.xszx.bean.UserAttendance;
import com.xszx.bean.UserVocate;
import com.xszx.bean.Wage;
import com.xszx.bean.AddressList;
import com.xszx.bean.Attqu;
import com.xszx.bean.DepInfo;
import com.xszx.bean.DepPosition;
import com.xszx.bean.EmpBasicInfo;

@Mapper
public interface ManaDao {

	//员工信息管理
	public List<EmpBasicInfo> selectEmpInfo();
	public int deleteEmpInfo(int id);
	public List<EmpBasicInfo> selectEmpByNo(String empNo);
	public int updateEmp(EmpInfo empInfo);
	public int addEmp(EmpInfo empInfo);
	public int addInsurance(Insurance insurance);//添加五险一金信息
	public int selectSameInsurance(Map<String,Object> map);//查询是否有相同的保险记录，通过员工号和月份查询
	public int selectInsuranceCount();
	public List<Insurance> selectAllInsurance(Map<String,Object> map);
	public int deleteInsurance(int id);
	public int updateInsurance(Insurance insurance);
	public List<Insurance> selectInsuranceByEmpNo(String empNo);
	//部门管理操作
	public List<DepInfo> selectDepInfo();
	public List<DepPosition> selectDepPosition(Map<String ,Object> map);
	public int addDep(DepInfo depInfo);
	public int updateDep(DepInfo depInfo);
	public int selectPositionNum(int id);
	public int deleteDepPosition(int id);
	public int editDepPosition(DepPosition depPosition);
	public int addDepPosition(DepPosition depPosition);
	public int selectSamePosition(String position);
	public int selectDepPositionCount();
	//考勤管理
	
	public List<EmpBasicInfo> selectEmpAtt();//录入考勤量化时获取员工数据
	//考勤量化
	public int addAttqu(Attqu attqu);
	public List<Attqu> selectAttqu(Map<String,Object> map);
	public int selectAttquCount();
	public int deleteAttqu(int id);
	public int updateAttqu(Attqu attqu);
	public int selectSameAttqu(Map<String,Object> map);
	//打卡
	public int updateAttendance(UserAttendance userAttendance);
	public List<UserAttendance> searchAttendanceByKeyWord(Map<String,Object> map);
	public List<UserAttendance> selectAllAttendance(Map<String,Integer> map);
	public int selectAttdanceCount();
	//请假
	public List<UserVocate> selectAllVacate();
	public int deleteVacate(int id);
	public int updateVacate(UserVocate userVocate);
	public List<UserVocate> selectVacateByKeyWord(String empNo);
	
	//薪资管理
	public List<Wage> selectThisMonthWages(Map<String,Object> map);//自动生成上月工资，month自动生成
	public List<Wage> selectWagesByMonth(String month);//保留功能，用于计算其他月份的工资，month有用户选择
	public List<Wage> selectAllWages(Map<String,Object> map);
	public List<Wage> selectWageByKeyWord(Map<String,Object> map);
	public int selectWageCount();
	public int addCheckedWages(Wage wage);
	public int addWages(Wage wage);
	public int deleteCheckedWages(int id);
	public int deleteWages(int id);
	public int updateWages(Wage wage);
	public int selectEmpCount();//用于生成薪资信息时分页，有多少个员工就应该有多少条薪资记录
	//在招职位
	public List<Position> selectOpenPosition();
	//备忘录
	public List<Memo> selectMemoByEmpNo(String empNo);
	public int deleteMemo(int id);
	//同学录
	public List<AddressList> selectAddressList();
	public List<AddressList> selectAddressListByKeyWord(String likeEmpNo);
	//在招职位
	public int addPosition(Position position);
	public int deletePosition(int id);
	//人才库
	public List<TalentBank> selectTalentBank();
	public int updateTalent(TalentBank talentBank);
	public int addTalent(TalentBank talentBank);
	public int deleteTalent(int id);
	public List<TalentBank> searchTalent(String name);
}
